package com.yycx.module.bus.provider.handler.cbreturn;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.interceptor.PageInterceptor;
import com.yycx.common.mybatis.model.PageParams;
import com.yycx.common.mybatis.query.CriteriaQuery;
import com.yycx.module.bus.client.entity.BusOrder;
import com.yycx.module.bus.client.entity.BusOrderDetails;
import org.springframework.stereotype.Component;

/**
 * 已退保证金列表
 *
 * @author zyf
 */
@Component("yesCbReturnPageListHandler")
public class YesCbReturnPageListHandler implements PageInterceptor<BusOrderDetails> {


    @Override
    public void prepare(CriteriaQuery<BusOrderDetails> cq, PageParams pageParams, EntityMap params) {
        Long returnPaymentId = params.getLong("returnPaymentId");
        cq.addSelect(BusOrder.class, "orderNo", "sendDate");
        cq.addSelect(BusOrderDetails.class,  "customBond");
        cq.eq(BusOrderDetails.class, "tbzjId", returnPaymentId);
    }

}
